package com.cssy.yd.logic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.byd.acegiext.domain.User;
import com.cssy.yd.logic.dao.LogicWhmoveOutwhItemDAO;
import com.cssy.yd.logic.entity.LogicWhmoveOutwhItemDO;
import com.cssy.yd.logic.service.ILogicStockTransferItemStartService;
import com.plat.exception.SyBaseException;
import com.plat.helper.SearchConditions;
import com.plat.helper.SearchResult;
import com.plat.util.IDCodeTypeUtil;

@Service("logicStockTransferItemStartService")
public class LogicStockTransferItemStartServiceImpl implements ILogicStockTransferItemStartService {

	@Resource(name = "logicWhmoveOutwhItemDAO")
	private LogicWhmoveOutwhItemDAO logicWhmoveOutwhItemDAO;
	
	@Override
	public SearchResult findListByExample(SearchConditions scs)
			throws SyBaseException {
		SearchResult rs=new SearchResult(scs);
		List<LogicWhmoveOutwhItemDO>  list= logicWhmoveOutwhItemDAO.find(scs);
		rs.setRecordCount(logicWhmoveOutwhItemDAO.count(scs));
		rs.setResults(list);
		return rs;
	}
	@Override
	public List<LogicWhmoveOutwhItemDO> getLogicWhmoveOutwhItemByOtherOutwhId(String otherWhCode)
			throws SyBaseException {
		
		List<LogicWhmoveOutwhItemDO>  list= logicWhmoveOutwhItemDAO.findListByOutwhId(otherWhCode);
		
		return list;
	}

	@Override
	public Integer delete(String id, User user) throws SyBaseException {
		
		return null;
	}

	@Override
	public Integer update(LogicWhmoveOutwhItemDO t, User user)
			throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public LogicWhmoveOutwhItemDO save(LogicWhmoveOutwhItemDO t, User user)
			throws SyBaseException {
		String id = IDCodeTypeUtil.getId();
		t.setId(id);
		logicWhmoveOutwhItemDAO.insertLogicWhmoveOutwhItemDO(t);
		return t;
	}

	@Override
	public LogicWhmoveOutwhItemDO findListById(String id)
			throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public SearchResult findOnRouteAffListByExample(SearchConditions scs)
			throws SyBaseException {
		SearchResult rs=new SearchResult(scs);
		List<LogicWhmoveOutwhItemDO>  list= logicWhmoveOutwhItemDAO.findOnRouteAff(scs);
		rs.setRecordCount(logicWhmoveOutwhItemDAO.findOnRouteAffCount(scs));
		rs.setResults(list);
		return rs;
	}
	@Override
	public Integer deleteBizRemoved(String id) throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}
}
